CC=gcc
CXX=g++
LD=gcc
AR=ar
RANLIB=ranlib
CFLAGS=-static -fPIC -fopenmp -std=c++20 -O3 -I. -Iglm
CXXFLAGS=$(CFLAGS) -fmax-errors=5
LDFLAGS=-s -g -L. -fopenmp
LDLIBS=-lm -lstdc++ -lgomp

ALLOBJS=$(OBJS)

all: libglbbuilder.a libglbbuilder.so

libglbbuilder.a: GLBBuilder/libglbbuilder.a
	mv GLBBuilder/libglbbuilder.a .

libglbbuilder.so: GLBBuilder/libglbbuilder.so
	mv GLBBuilder/libglbbuilder.so .

GLBBuilder/libglbbuilder.a:
	$(MAKE) -C GLBBuilder

GLBBuilder/libglbbuilder.so:
	$(MAKE) -C GLBBuilder

clean:
	rm -f *.a *.o *.so
	$(MAKE) -C GLBBuilder clean
